package com.ruoyi.project.business.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.business.mapper.PaperMapper;
import com.ruoyi.project.business.domain.Paper;
import com.ruoyi.project.business.service.IPaperService;

/**
 * 试卷Service业务层处理
 *
 * @author hongwj
 * @date 2024-10-22
 */
@Service
public class PaperServiceImpl implements IPaperService {
    @Autowired
    private PaperMapper paperMapper;

    /**
     * 查询试卷
     *
     * @param id 试卷主键
     * @return 试卷
     */
    @Override
    public Paper selectPaperById(Long id) {
        return paperMapper.selectPaperById(id);
    }

    /**
     * 查询试卷列表
     *
     * @param paper 试卷
     * @return 试卷
     */
    @Override
    public List<Paper> selectPaperList(Paper paper) {
        return paperMapper.selectPaperList(paper);
    }

    /**
     * 新增试卷
     *
     * @param paper 试卷
     * @return 结果
     */
    @Override
    public int insertPaper(Paper paper) {
            return paperMapper.insertPaper(paper);
    }

    /**
     * 修改试卷
     *
     * @param paper 试卷
     * @return 结果
     */
    @Override
    public int updatePaper(Paper paper) {
        return paperMapper.updatePaper(paper);
    }

    /**
     * 批量删除试卷
     *
     * @param ids 需要删除的试卷主键
     * @return 结果
     */
    @Override
    public int deletePaperByIds(Long[] ids) {
        return paperMapper.deletePaperByIds(ids);
    }

    /**
     * 删除试卷信息
     *
     * @param id 试卷主键
     * @return 结果
     */
    @Override
    public int deletePaperById(Long id) {
        return paperMapper.deletePaperById(id);
    }
}
